<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>收款记录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="../css/paging.css" />
		<script type="text/javascript" src="../js/jquery-1.8.3.js" ></script>
		<script type="text/javascript" src="../js/query.js" ></script>
    	<script type="text/javascript" src="../js/paging.js" ></script>
	</head>

	<style>
		h3{margin: 1em auto; text-align: center;}
		table{width: 94%; margin-left: 3%; text-align: center; font-size: 14px; margin-top: 1em;}
		table td,table th{border: 1px solid #007aff;}
		h4{margin-left: 1em; margin-top: 1em;}
		#GWPAGE ul{margin: 1em auto; margin-left: 5%; width: 80%;}
	</style>

	<body>
		<table>
			<thead>
			<tr>
				<th>卡片尾号</th>
				<th>金额(元)</th>
				<th>费率</th>
				<th>到账(元)</th>
				<th>时间</th>
			</tr>
			</thead>
			<tbody id="order_list">

			</tbody>
		</table>
		<div id="GWPAGE"></div>
	</body>
	<script>
		var openID;
		$(function(){
			openID = localStorage.getItem("ll_openID");
			var start = 0, limit = 10;				
	        var pageCount = getOrderList(start,limit);		     
	        $('#GWPAGE').Paging({pagesize:limit,count:pageCount,toolbar:false,callback:function(page,size,count){
	        	getOrderList((page-1)*limit,size);
	        }});
		});
	
		function getOrderList(start,limit) {
			var pageCount;
            $.ajax({
            	url : '../llPay/getOrderList',
                type : "post",
                async : false,
                data : {
                	'openID' : openID,
                	'start' : start,
                	'limit' : limit
                },
                success: function(res){
                    var data = res.list;
                    pageCount = res.count;
                    $("#order_list").empty();
                    var str = '';
                    for(var i in data){
                        str += '<tr>';
                        str += '    <td>' + data[i].credit_card_no + '</td>';
                        str += '    <td>' + data[i].totalFee + '</td>';
                        str += '    <td>' + data[i].fee0 + '</td>';
                        str += '    <td>' + data[i].getFee+ '</td>';
                        str += '    <td>' + data[i].updateTime+ '</td>';
                        str += '</tr>';
                    }
                    $("#order_list").html($(str));
                },
                error: function(){
                    alert('获取记录失败！');
                }
            });
            return pageCount;
        }
	</script>

</html>